﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Training.Domain;
using Training.Application.Services;
using System.Configuration;
using Training.Domain.Repositories;
using Training.Application;
using Training.Data.Repositories;

namespace TrainingApplication
{
    public class PersonAppService : IPersonAppService
    {
        public IPersonRepository personRepository { get; set; }

        public PersonAppService()
        {
            this.personRepository = new PersonCsvRepository();
        }

        public IEnumerable<Person> GetAll()
        {
            return personRepository.GetAll();
        }

        public Person Save(Person person)
        {
            return personRepository.Save(person);
        }

        public void RemoveItem(string vat)
        {
            personRepository.Remove(vat);
        }
    }
}
